package com.enjoyor.health.HGPT.web;

/**
 * 出错代码枚举
 * @author Zhu Min
 * @date 2023/10/18 9:35
 */
public enum CodeEnum {

    SUCCESS(200, "success"),
    MISS_CODE(202, "code参数缺失"),
    MISS_APPID(203, "APPID缺失或错误，请核实"),
    NO_USER_INFO(204, "未获取到用户信息"),
    SERVER_EXCEPTION(500, "服务器异常"),
    JS_CODE_ERROR(40029, "js_code无效"),
    BUSY(-1, "系统繁忙，此时请开发者稍候再试"),
    WX_TOKEN_FAILED(205, "获取ACCESS_TOKEN失败"),
    RESERVATION_EXIST(207, "当前时段已经预约过"),
    RESERVATION_MAX(206, "当前时段预约人数已满"),
    ERROR(-1, "error"),
    PARAM_MISS(208, "缺少参数"),
    DATA_NULL(210, "data数据为空"),
    TRY_LATER(300, "请稍后重试"),
    LOGIN_FAILED(301, "登录验证失败，请重试"),
    TOKEN_FAILED(302, "登录验证失败，请重新登录")
    ;

    CodeEnum(Integer statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    private Integer statusCode;

    private String message;

    public Integer getStatusCode() {
        return statusCode;
    }

    public String getMessage() {
        return message;
    }
}
